\newproblem{lay:6_8_8}{
  % Problem identification
	\begin{large}
	  \hspace{\fill}\newline
    \textbf{Lay, 6.8.8}
	\end{large}
	\\
  \ifthenelse{\boolean{identifyAuthor}}{\textit{Carlos Oscar Sorzano, Aug. 31st, 2013} \\}{}

  % Problem statement
	Find the third-order Fourier approximation to $f(t)=t-1$ within the range $[0,2\pi]$ with the inner product defined in Exercise 6.8.6.
}{
   % Solution
	The approximation we seek is of the form
	\begin{center}
		$f(t)\approx \frac{\left<f(t),1\right>}{\|1\|^2}+\sum\limits_{n=1}^3{\left(\frac{\left<f(t),\cos(nt)\right>}{\|\cos(nt)\|^2}\cos(nt)+
			\frac{\left<f(t),\sin(nt)\right>}{\|\sin(nt)\|^2}\sin(nt)\right)}$
	\end{center}
	Let us calculate the different terms
	\begin{center}
		\begin{tabular}{l}
			$\left<t-1,1\right>=\int\limits_0^{2\pi}{(t-1)dt}=2\pi(\pi-1)$ \\
			$\|1\|^2=\int\limits_0^{2\pi}{1^2dt}=2\pi$ \\
			$\left<t-1,\cos(nt)\right>=\int\limits_0^{2\pi}{(t-1)\cos(nt)dt}=0$ \\
			$\left<t-1,\sin(nt)\right>=\int\limits_0^{2\pi}{(t-1)\sin(nt)dt}=-\frac{(\pi+1)}{n}$\\
			$\|\sin(nt)\|^2=\int\limits_0^{2\pi}{\sin^2(nt)}{dt}=\pi$ \\
		\end{tabular}
	\end{center}
	Gathering all together, we have
	\begin{center}
		$\begin{array}{rcl}
		   t-1&\approx& \frac{2\pi(\pi-1)}{2\pi}+\frac{-(\pi+1)}{\pi}\sin(t)+\frac{-\frac{(\pi+1)}{2}}{\pi}\sin(2t)+\frac{-\frac{(\pi+1)}{3}}{\pi}\sin(3t) \\
			    &=& (\pi-1)-\frac{\pi+1}{\pi}\left(\sin(t)+\frac{1}{2}\sin(2t)+\frac{1}{3}\sin(3t)\right)
		\end{array}$
	\end{center}
	We have both functions represented below
	\begin{center}
		\includegraphics[scale=0.5]{Tema7/lay_6_8_8.eps}
	\end{center}
}
\useproblem{lay:6_8_8}
\ifthenelse{\boolean{eachProblemInOnePage}}{\newpage}{}

